package com.cn.zengzeng.spbzengzeng.test;

import org.junit.Test;

import java.io.FileInputStream;

/**
 * @Description:
 * @Author: zhangzengzeng
 * @Date: 2021/10/13 10:35
 */
public class tryCatchDemo {
    public static void main (String[] args) {
        // try(资源) {  //实现Closeable 接口的 try执行完自动关闭资源

        // }catch(){

        // }
        try(FileInputStream inputStream = new FileInputStream("")) {
            inputStream.close();
        }catch(Exception e) {
            e.printStackTrace();
        }

    }

    @Test
    public void show(){
        String str = "E8FSAGQ1626096228920315904" ;
        int i = str.hashCode();
        int b = 0;
        if(i<0){
            b=-i ;
        }
        int d = b%3;
        System.out.println("d = " + d);
    }
}
